﻿<UserControl x:Class="Mengsk.ProxyDelivery.Print.UI.GoodsCountUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
             d:DesignHeight="300" d:DesignWidth="600" Loaded="UserControl_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Orientation="Horizontal">
            <TextBlock Text="开始时间:" Margin="3" VerticalAlignment="Center"/>
            <xctk:DateTimePicker Name="dpStart" Margin="3" VerticalAlignment="Center" Width="160"  Format="Custom" FormatString="yyyy-MM-dd HH:mm:ss"/>
            <Button Grid.Row="0" Content="下载" Name="btnDownload" Click="btnDownload_Click" Width="60" HorizontalAlignment="Left" Margin="3"/>
            <Button Content="打印" Name="btnPrint" Click="btnPrint_Click" Width="60" HorizontalAlignment="Left" Margin="3"/>
            <TextBlock Text="最小数量:" Margin="3" VerticalAlignment="Center"/>
            <TextBox Name="tbMinCount" Margin="3" Text="3" Width="20"/>
            <Button Name="btnPrintNew" Content="打印" Margin="3" VerticalAlignment="Center" Click="btnPrintNew_Click" Width="60"/>
            <TextBlock Margin="3" VerticalAlignment="Center" Name="tbTotalCount"/>
        </StackPanel>
        <DataGrid Grid.Row="1" Name="dgvGoodsCount" SelectionMode="Extended"  SelectionUnit="CellOrRowHeader" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeRows="False">
            <DataGrid.Columns>
                <DataGridTextColumn Header="门牌编号" Width="Auto" Binding="{Binding Address}" IsReadOnly="True"/>
                <DataGridTextColumn Header="厂家名称" Width="Auto" Binding="{Binding Vendor}" IsReadOnly="True"/>
                <DataGridTextColumn Header="厂家货号" Width="Auto" Binding="{Binding Number}" IsReadOnly="True"/>
                <DataGridTextColumn Header="货号版本" Width="Auto" Binding="{Binding Edtion}" IsReadOnly="True"/>
                <DataGridTextColumn Header="颜色" Width="Auto" Binding="{Binding Color}" IsReadOnly="True"/>
                <DataGridTextColumn Header="尺码" Width="Auto" Binding="{Binding Size}" IsReadOnly="True"/>
                <DataGridTextColumn Header="单价" Width="Auto" Binding="{Binding Money}" IsReadOnly="True"/>
                <DataGridTextColumn Header="数量" Width="Auto" Binding="{Binding Count}" />
                <DataGridTextColumn Header="最早日期" Width="Auto" Binding="{Binding PayTime,Converter={StaticResource datetimeConverter}}" />
                <DataGridTextColumn Header="订单编号" Width="Auto" Binding="{Binding OrderId}"/>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</UserControl>
